package com.xbongbong.pro.statistic.pojo;

import com.alibaba.fastjson.JSONArray;
import com.xbongbong.paas.toolbox.wrap.BaseDTO;
import com.xbongbong.pro.enums.datacenter.datawarning.enums.ActionTypeEnum;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.util.List;

/**
 * @ClassName DataWarningSavePojo
 * @Description 保存数据预警
 * @Author mengna.Deng
 * @Date 2021/4/16 20:13
 * @Version 1.0
 */
@Getter
@Setter
@ToString
public class DwHistorySavePojo extends BaseDTO {
    /**
     * 主键
     */
    private Long id;
    /**
     * 公司id
     */
    private String corpid;
    /**
     * 数据预警id
     */
    private Long dataWarningId;
    /**
     * 数据预警关联的图表id
     */
    private Long chartId;
    /**
     * 预警数据
     */
    private List<DwHistoryDataPojo> data;
    /**
     * 执行动作,1消息，2短信
     * @see ActionTypeEnum
     */
    private JSONArray action;
    /**
     * 是否执行失效，0有效，1失效
     */
    private Integer triggerInvalid;
    /**
     * 执行次数
     */
    private Integer triggerNum;
    /**
     * 创建时间
     */
    private Long addTime;
    /**
     * 更新时间
     */
    private Long updateTime;
    /**
     * 删除标记
     */
    private Integer del;

    public DwHistorySavePojo(Long id, String corpid, Long dataWarningId, Long chartId, List<DwHistoryDataPojo> data, JSONArray action, Integer triggerInvalid, Integer triggerNum, Long addTime, Long updateTime, Integer del) {
        this.id = id;
        this.corpid = corpid;
        this.dataWarningId = dataWarningId;
        this.chartId = chartId;
        this.data = data;
        this.action = action;
        this.triggerInvalid = triggerInvalid;
        this.triggerNum = triggerNum;
        this.addTime = addTime;
        this.updateTime = updateTime;
        this.del = del;
    }

    public DwHistorySavePojo() {
    }
}
